package com.li.designpattern.nullobject;

public class CustomerFactory {
	private static String[] names={"lic","yang"};
	
	public static Customer getName(String name){
		for(int i=0;i<names.length;i++){
			if(names[i].equals(name)){
				return new RealCustomer(name);
			}
		}
		return new NullCustomer();
	}
}
